home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 3239 / 3239.xpi / chrome / inbasicph.jar / content / jAbout.js < prev    next >
Text File  |  2009-04-03  |  685b  |  16 lines

  1. var PhProxy_about = {
  2.     open_link : function (URL) {
  3.         var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
  4.                .getService(Components.interfaces.nsIWindowMediator);
  5.         var win = wm.getMostRecentWindow("navigator:browser");
  6.         var gBrowser = win.getBrowser();
  7.         gBrowser.loadOneTab(URL, null, null, null, false, false);
  8.     },
  9.     open_addon : function (URL) {
  10.         var wm = Components.classes['@mozilla.org/appshell/window-mediator;1']
  11.          .getService(Components.interfaces.nsIWindowMediator);
  12.         var mainWindow = wm.getMostRecentWindow('navigator:browser');
  13.         var newTab = mainWindow.getBrowser().addTab(URL);
  14.         mainWindow.getBrowser().selectedTab = newTab;
  15.     }
  16. }